package org.deschutter.hibernate;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Basic;
import javax.persistence.Column;

/**
 * User: Berten De Schutter
 * Date: 01-Oct-2009
 * Time: 13:38:35
 */
@Entity
@Table(catalog = "scimitar", name = "galaxy_size_rank")
public class GalaxySizeRank {
    private int id;

    @Basic
    @Column(name = "ID")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    private int x;

    @Basic
    @Column(name = "x")
    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    private int y;

    @Basic
    @Column(name = "y")
    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        GalaxySizeRank that = (GalaxySizeRank) o;

        if (id != that.id) return false;
        if (x != that.x) return false;
        if (y != that.y) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + x;
        result = 31 * result + y;
        return result;
    }
}
